package cn.bandeqing.productInventory.entity;

import cn.bandeqing.frame.mybatis.config.InsertOrUpdateListener;
import cn.bandeqing.frame.mybatis.entity.BaseEntity;
import cn.bandeqing.product.req.ProductInventorySaveOrUpdateReq;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 产品库存表 实体类。
 *
 * @author fugui
 * @since 2024-01-28
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "bdq_product_inventory", onInsert = InsertOrUpdateListener.class, onUpdate = InsertOrUpdateListener.class)
@AutoMapper(target = ProductInventorySaveOrUpdateReq.class, convertGenerate = false)
public class ProductInventory extends BaseEntity {

    @Id(keyType = KeyType.Auto)
    private Long inventoryId;

    /**
     * 规格ID
     */
    private Long productSpecificationId;
    private String productSpecification;

    private Long productId;
    private String productName;

//    private Double productPrice;
//    private Double productTotalPrice;

    /**
     * 店铺ID
     */
    private Long storeId;

    /**
     * 店铺名称
     */
    private String storeName;

    /**
     * 库存
     */
    private Integer productInventory;

}
